<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>

  <script src="2.js"></script>
  <script>
    /*
    function timeout(ms) {
      return new Promise((resolve) => {
        setTimeout(resolve, ms);
      });
    }

    async function asyncPrint(value, ms) {
      await timeout(ms);
      console.log(value);
    }

    asyncPrint('hello world', 3000);
    */
   
   /*
   let obj = {
    name: 'wfy',
    async foo() {
      await setTimeout(()=>{console.log(this.name);return this.name},1000);
    }
   }

   obj.foo().then(function(name){
    console.log(name.length);
   });*/
  </script>
</body>
</html>